import axios from "axios"
export let getData =  () =>{
    return async (dispatch)=>{
        let data = await axios.get("/list")
        dispatch({
            type:"ALLDATA",
            payload:data.data.list
        })
    }
}

export let delItem = (key) =>{
    return {
        type:"DELITEM",
        payload:key
    }
}

export let editItem = (key) =>{
    return {
        type:"EDITITEM",
        payload:key
    }
}